package com.own.constant;

import java.time.format.DateTimeFormatter;

/**
 * ConstantDateFormatPattern
 *
 * @author chenxueli
 * @date 2024-01-18 15:35:00
 */
public class ConstantDateFormatPattern {

    /**
     * 日期时间匹配格式
     */
    public interface Pattern {
        /**
         * yyyy-MM-dd
         */
        String DATE = "yyyy-MM-dd";
        /**
         * yyyy-MM-dd HH:mm:ss
         */
        String DATETIME = "yyyy-MM-dd HH:mm:ss";
        /**
         * yyyy-MM-dd HH:mm
         */
        String DATETIME_MM = "yyyy-MM-dd HH:mm";
        /**
         * yyyy-MM-dd HH:mm:ss.SSS
         */
        String DATETIME_SSS = "yyyy-MM-dd HH:mm:ss.SSS";
        /**
         * HH:mm
         */
        String HH_MM = "HH:mm";
        /**
         * HH:mm:ss
         */
        String HH_MM_SS = "HH:mm:ss";
        /**
         * yyyy/MM/dd
         */
        String SYS_DATE = "yyyy/MM/dd";
        /**
         * yyyy/MM/dd HH:mm:ss
         */
        String SYS_DATETIME = "yyyy/MM/dd HH:mm:ss";
        /**
         * yyyy/MM/dd HH:mm
         */
        String SYS_DATETIME_MM = "yyyy/MM/dd HH:mm";
        /**
         * yyyy/MM/dd HH:mm:ss.SSS
         */
        String SYS_DATETIME_SSS = "yyyy/MM/dd HH:mm:ss.SSS";
        /**
         * yyyyQQ
         */
        String YEAR_QUARTER = "yyyyQQ";
        /**
         * yyyyMM
         */
        String YEAR_MONTH = "yyyyMM";
        /**
         * YYYY_MM_DD
         */
        String YYYY_MM_DD = "yyyyMMdd";
    }

    /**
     * 日期时间匹配格式
     */
    public interface Formatter {
        /**
         * yyyy-MM-dd
         */
        DateTimeFormatter DATE = DateTimeFormatter.ofPattern(Pattern.DATE);
        /**
         * yyyy-MM-dd HH:mm:ss
         */
        DateTimeFormatter DATETIME = DateTimeFormatter.ofPattern(Pattern.DATETIME);
        /**
         * yyyy-MM-dd HH:mm
         */
        DateTimeFormatter DATETIME_MM = DateTimeFormatter.ofPattern(Pattern.DATETIME_MM);
        /**
         * yyyy-MM-dd HH:mm:ss.SSS
         */
        DateTimeFormatter DATETIME_SSS = DateTimeFormatter.ofPattern(Pattern.DATETIME_SSS);
        /**
         * HH:mm
         */
        DateTimeFormatter HH_MM = DateTimeFormatter.ofPattern(Pattern.HH_MM);
        /**
         * HH:mm:ss
         */
        DateTimeFormatter HH_MM_SS = DateTimeFormatter.ofPattern(Pattern.HH_MM_SS);
        /**
         * yyyy/MM/dd
         */
        DateTimeFormatter SYS_DATE = DateTimeFormatter.ofPattern(Pattern.SYS_DATE);
        /**
         * yyyy/MM/dd HH:mm:ss
         */
        DateTimeFormatter SYS_DATETIME = DateTimeFormatter.ofPattern(Pattern.SYS_DATETIME);
        /**
         * yyyy/MM/dd HH:mm
         */
        DateTimeFormatter SYS_DATETIME_MM = DateTimeFormatter.ofPattern(Pattern.SYS_DATETIME_MM);
        /**
         * yyyy/MM/dd HH:mm:ss.SSS
         */
        DateTimeFormatter SYS_DATETIME_SSS = DateTimeFormatter.ofPattern(Pattern.SYS_DATETIME_SSS);
        /**
         * yyyyQQ
         */
        DateTimeFormatter YEAR_QUARTER = DateTimeFormatter.ofPattern(Pattern.YEAR_QUARTER);
        /**
         * yyyyMM
         */
        DateTimeFormatter YEAR_MONTH = DateTimeFormatter.ofPattern(Pattern.YEAR_MONTH);
        /**
         * YYYY_MM_DD
         */
        DateTimeFormatter YYYY_MM_DD = DateTimeFormatter.ofPattern(Pattern.YYYY_MM_DD);
    }

}
